//
//  AEHistoryScoresRequest.m
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2024/10/29.
//  Copyright © 2024 Mr.Wang. All rights reserved.
//

#import "AEHistoryScoresRequest.h"
#import "AE_Solar-Swift.h"

@interface AEHistoryScoresRequest ()
@property (nonatomic, assign) NSInteger pageNum;
@property (nonatomic, assign) NSInteger pageSize;
@end

@implementation AEHistoryScoresRequest

- (instancetype)initWithPageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize {
    if (self = [super init]) {
        self.pageNum = pageNum;
        self.pageSize = pageSize;
    }
    return self;
}

- (NSString *)requestUrl {
    return kAPP_HISTORY_SCORE_LIST;
}

- (TYZRequestMethod)requestMethod {
    return TYZRequestMethodPOST;
}

- (id)requestArgument {
    NSDictionary *params = @{
        @"pageNum": @(self.pageNum),
        @"pageSize": @(self.pageSize)
    };
    
    NSString *json = [params yy_modelToJSONString];
    NSString *aesStr = [AESCrypt AES128Encrypt:json key:[AEUserCommonInfo getAesKey]];
    return @{@"requestData": aesStr};
}

- (Class)rspClass {
    return [WDBaseRspModel class];
}

- (Class)recordsRspClass {
    return [AEHistoryScoresModel class];
}

@end
